<?php
class Config_model extends DNN_model
{
	protected  $_table = 'site_configs';
	
	function __construct() {
		parent::__construct();
	}
	
	function get_paged_list($limit = 10, $offset = 0) {
		$this->db->select('*');
		$this->db->from($this->_table);
		$this->db->order_by('id','asc');
		$this->db->limit($limit, $offset);
		return $this->db->get();
	}
	
	function get_by_id($id) {
		$this->db->select('*');
		$this->db->from($this->_table);
		$this->db->where('id', $id);
		return $this->db->get();
	}
	
	function get_by_key($key) {
		$this->db->select('*');
		$this->db->from($this->_table);
		$this->db->where('key', $key);
		return $this->db->get();
	}
}
?>